<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>SC2API: include/sc2api/sc2_common.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="SC2-Logo.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">SC2API
   </div>
   <div id="projectbrief">An API for AI for StarCraft II</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_3d0dfd3160b31ffa512c49330ac8d646.html">sc2api</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">sc2_common.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Common data types, including points, rectangles and colors.  
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &lt;algorithm&gt;</code><br />
<code>#include &lt;cmath&gt;</code><br />
<code>#include &lt;cstdint&gt;</code><br />
</div>
<p><a href="sc2__common_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structsc2_1_1_point3_d.html">sc2::Point3D</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structsc2_1_1_point2_d.html">sc2::Point2D</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structsc2_1_1_rect2_d.html">sc2::Rect2D</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">2D rectangle.  <a href="structsc2_1_1_rect2_d.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structsc2_1_1_point2_d_i.html">sc2::Point2DI</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">2D integer point.  <a href="structsc2_1_1_point2_d_i.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structsc2_1_1_rect2_d_i.html">sc2::Rect2DI</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">2D integer rectangle.  <a href="structsc2_1_1_rect2_d_i.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structsc2_1_1_color.html">sc2::Color</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">RGB <a class="el" href="structsc2_1_1_color.html" title="RGB Color. ">Color</a>.  <a href="structsc2_1_1_color.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:a169145fe6d2f2b308b5d5496299e791d"><td class="memItemLeft" align="right" valign="top"><a id="a169145fe6d2f2b308b5d5496299e791d"></a>
typedef Point2D&#160;</td><td class="memItemRight" valign="bottom"><b>sc2::Vector2D</b></td></tr>
<tr class="separator:a169145fe6d2f2b308b5d5496299e791d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4ba9646e0f90d9b7a629b86eb23461f3"><td class="memItemLeft" align="right" valign="top"><a id="a4ba9646e0f90d9b7a629b86eb23461f3"></a>
typedef Point3D&#160;</td><td class="memItemRight" valign="bottom"><b>sc2::Vector3D</b></td></tr>
<tr class="separator:a4ba9646e0f90d9b7a629b86eb23461f3"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a6a050d19a7dd81f132dfdb45e567476e"><td class="memItemLeft" align="right" valign="top"><a id="a6a050d19a7dd81f132dfdb45e567476e"></a>
Point3D&#160;</td><td class="memItemRight" valign="bottom"><b>sc2::operator+</b> (const Point3D &amp;lhs, const Point3D &amp;rhs)</td></tr>
<tr class="separator:a6a050d19a7dd81f132dfdb45e567476e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9b4b0bb997b2c52b57302d81a2c6dfe0"><td class="memItemLeft" align="right" valign="top"><a id="a9b4b0bb997b2c52b57302d81a2c6dfe0"></a>
Point3D&#160;</td><td class="memItemRight" valign="bottom"><b>sc2::operator-</b> (const Point3D &amp;lhs, const Point3D &amp;rhs)</td></tr>
<tr class="separator:a9b4b0bb997b2c52b57302d81a2c6dfe0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0368a6b163c72c5e8b7342249378acee"><td class="memItemLeft" align="right" valign="top"><a id="a0368a6b163c72c5e8b7342249378acee"></a>
Point3D&#160;</td><td class="memItemRight" valign="bottom"><b>sc2::operator*</b> (const Point3D &amp;lhs, float rhs)</td></tr>
<tr class="separator:a0368a6b163c72c5e8b7342249378acee"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aff3d7950597ae0877f601da0fe944f90"><td class="memItemLeft" align="right" valign="top"><a id="aff3d7950597ae0877f601da0fe944f90"></a>
Point3D&#160;</td><td class="memItemRight" valign="bottom"><b>sc2::operator*</b> (float lhs, const Point3D &amp;rhs)</td></tr>
<tr class="separator:aff3d7950597ae0877f601da0fe944f90"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a13c3184516ef7381c9d30ae7864bfd9b"><td class="memItemLeft" align="right" valign="top"><a id="a13c3184516ef7381c9d30ae7864bfd9b"></a>
Point3D&#160;</td><td class="memItemRight" valign="bottom"><b>sc2::operator/</b> (const Point3D &amp;lhs, float rhs)</td></tr>
<tr class="separator:a13c3184516ef7381c9d30ae7864bfd9b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8326f738c3a76fbb35afff6d82080cf1"><td class="memItemLeft" align="right" valign="top"><a id="a8326f738c3a76fbb35afff6d82080cf1"></a>
Point3D&#160;</td><td class="memItemRight" valign="bottom"><b>sc2::operator/</b> (float lhs, const Point3D &amp;rhs)</td></tr>
<tr class="separator:a8326f738c3a76fbb35afff6d82080cf1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7d7f120c2191efa070f8619c33df97db"><td class="memItemLeft" align="right" valign="top"><a id="a7d7f120c2191efa070f8619c33df97db"></a>
Point2D&#160;</td><td class="memItemRight" valign="bottom"><b>sc2::operator+</b> (const Point2D &amp;lhs, const Point2D &amp;rhs)</td></tr>
<tr class="separator:a7d7f120c2191efa070f8619c33df97db"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad332e61d3bd4b23d77e2dc21546f1c78"><td class="memItemLeft" align="right" valign="top"><a id="ad332e61d3bd4b23d77e2dc21546f1c78"></a>
Point2D&#160;</td><td class="memItemRight" valign="bottom"><b>sc2::operator-</b> (const Point2D &amp;lhs, const Point2D &amp;rhs)</td></tr>
<tr class="separator:ad332e61d3bd4b23d77e2dc21546f1c78"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa9742e7533747a68373ecbb3af262487"><td class="memItemLeft" align="right" valign="top"><a id="aa9742e7533747a68373ecbb3af262487"></a>
Point2D&#160;</td><td class="memItemRight" valign="bottom"><b>sc2::operator*</b> (const Point2D &amp;lhs, float rhs)</td></tr>
<tr class="separator:aa9742e7533747a68373ecbb3af262487"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5ecabe86a83b1902c56e83374d07c1ba"><td class="memItemLeft" align="right" valign="top"><a id="a5ecabe86a83b1902c56e83374d07c1ba"></a>
Point2D&#160;</td><td class="memItemRight" valign="bottom"><b>sc2::operator*</b> (float lhs, const Point2D &amp;rhs)</td></tr>
<tr class="separator:a5ecabe86a83b1902c56e83374d07c1ba"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a034072c303ef7ded529f4fa1547e11f7"><td class="memItemLeft" align="right" valign="top"><a id="a034072c303ef7ded529f4fa1547e11f7"></a>
Point2D&#160;</td><td class="memItemRight" valign="bottom"><b>sc2::operator/</b> (const Point2D &amp;lhs, float rhs)</td></tr>
<tr class="separator:a034072c303ef7ded529f4fa1547e11f7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4b3ac3afc8141fa729cd28ecb30dc61b"><td class="memItemLeft" align="right" valign="top"><a id="a4b3ac3afc8141fa729cd28ecb30dc61b"></a>
Point2D&#160;</td><td class="memItemRight" valign="bottom"><b>sc2::operator/</b> (float lhs, const Point2D &amp;rhs)</td></tr>
<tr class="separator:a4b3ac3afc8141fa729cd28ecb30dc61b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a846ab3c3ff7c33caf7da2dff90a4a171"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sc2__common_8h.html#a846ab3c3ff7c33caf7da2dff90a4a171">sc2::GetRandomScalar</a> ()</td></tr>
<tr class="separator:a846ab3c3ff7c33caf7da2dff90a4a171"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0de5bf2e0593ea26ef8dd93ee5456744"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sc2__common_8h.html#a0de5bf2e0593ea26ef8dd93ee5456744">sc2::GetRandomFraction</a> ()</td></tr>
<tr class="separator:a0de5bf2e0593ea26ef8dd93ee5456744"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa35b0863b3931b50ce517abab8d06018"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sc2__common_8h.html#aa35b0863b3931b50ce517abab8d06018">sc2::GetRandomInteger</a> (int min, int max)</td></tr>
<tr class="separator:aa35b0863b3931b50ce517abab8d06018"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abc67208faaf8b25c157b46bb6f96e5a5"><td class="memTemplParams" colspan="2">template&lt;typename Container &gt; </td></tr>
<tr class="memitem:abc67208faaf8b25c157b46bb6f96e5a5"><td class="memTemplItemLeft" align="right" valign="top">Container::value_type &amp;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="sc2__common_8h.html#abc67208faaf8b25c157b46bb6f96e5a5">sc2::GetRandomEntry</a> (Container &amp;container)</td></tr>
<tr class="separator:abc67208faaf8b25c157b46bb6f96e5a5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a828525a11f27628914021c21736f2810"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sc2__common_8h.html#a828525a11f27628914021c21736f2810">sc2::Distance2D</a> (const Point2D &amp;a, const Point2D &amp;b)</td></tr>
<tr class="separator:a828525a11f27628914021c21736f2810"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9c649eca988aae078b7e72d087c2459f"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sc2__common_8h.html#a9c649eca988aae078b7e72d087c2459f">sc2::DistanceSquared2D</a> (const Point2D &amp;a, const Point2D &amp;b)</td></tr>
<tr class="separator:a9c649eca988aae078b7e72d087c2459f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a32b33904e90d1de59f334c664971c70a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sc2__common_8h.html#a32b33904e90d1de59f334c664971c70a">sc2::Normalize2D</a> (Point2D &amp;a)</td></tr>
<tr class="separator:a32b33904e90d1de59f334c664971c70a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5fc6c7967b887f2f9e1338db01a9d079"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sc2__common_8h.html#a5fc6c7967b887f2f9e1338db01a9d079">sc2::Dot2D</a> (const Point2D &amp;a, const Point2D &amp;b)</td></tr>
<tr class="separator:a5fc6c7967b887f2f9e1338db01a9d079"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a68da467a343f431544f3cea7c105bcde"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sc2__common_8h.html#a68da467a343f431544f3cea7c105bcde">sc2::Distance3D</a> (const Point3D &amp;a, const Point3D &amp;b)</td></tr>
<tr class="separator:a68da467a343f431544f3cea7c105bcde"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8019c6d22ca3004461370617a00a4644"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sc2__common_8h.html#a8019c6d22ca3004461370617a00a4644">sc2::DistanceSquared3D</a> (const Point3D &amp;a, const Point3D &amp;b)</td></tr>
<tr class="separator:a8019c6d22ca3004461370617a00a4644"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab4edfeead03941be04ed2fca1ed4e551"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sc2__common_8h.html#ab4edfeead03941be04ed2fca1ed4e551">sc2::Normalize3D</a> (Point3D &amp;a)</td></tr>
<tr class="separator:ab4edfeead03941be04ed2fca1ed4e551"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9c24088000a232e811c93759fc08bad9"><td class="memItemLeft" align="right" valign="top">float&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="sc2__common_8h.html#a9c24088000a232e811c93759fc08bad9">sc2::Dot3D</a> (const Point3D &amp;a, const Point3D &amp;b)</td></tr>
<tr class="separator:a9c24088000a232e811c93759fc08bad9"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Common data types, including points, rectangles and colors. </p>
</div><h2 class="groupheader">Function Documentation</h2>
<a id="file_a828525a11f27628914021c21736f2810"></a>
<h2 class="memtitle"><span class="permalink"><a href="#file_a828525a11f27628914021c21736f2810">&#9670;&nbsp;</a></span>Distance2D()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float sc2::Distance2D </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structsc2_1_1_point2_d.html">Point2D</a> &amp;&#160;</td>
          <td class="paramname"><em>a</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structsc2_1_1_point2_d.html">Point2D</a> &amp;&#160;</td>
          <td class="paramname"><em>b</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>The distance between two 2D points. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">a</td><td>First point. </td></tr>
    <tr><td class="paramname">b</td><td>Second point. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Distance. </dd></dl>

</div>
</div>
<a id="file_a68da467a343f431544f3cea7c105bcde"></a>
<h2 class="memtitle"><span class="permalink"><a href="#file_a68da467a343f431544f3cea7c105bcde">&#9670;&nbsp;</a></span>Distance3D()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float sc2::Distance3D </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structsc2_1_1_point3_d.html">Point3D</a> &amp;&#160;</td>
          <td class="paramname"><em>a</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structsc2_1_1_point3_d.html">Point3D</a> &amp;&#160;</td>
          <td class="paramname"><em>b</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>The distance between two 3D points. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">a</td><td>First point. </td></tr>
    <tr><td class="paramname">b</td><td>Second point. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Distance. </dd></dl>

</div>
</div>
<a id="file_a9c649eca988aae078b7e72d087c2459f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#file_a9c649eca988aae078b7e72d087c2459f">&#9670;&nbsp;</a></span>DistanceSquared2D()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float sc2::DistanceSquared2D </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structsc2_1_1_point2_d.html">Point2D</a> &amp;&#160;</td>
          <td class="paramname"><em>a</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structsc2_1_1_point2_d.html">Point2D</a> &amp;&#160;</td>
          <td class="paramname"><em>b</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>The distance squared between two 2D points, faster than Distance2D. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">a</td><td>First point. </td></tr>
    <tr><td class="paramname">b</td><td>Second point. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Distance^2. </dd></dl>

</div>
</div>
<a id="file_a8019c6d22ca3004461370617a00a4644"></a>
<h2 class="memtitle"><span class="permalink"><a href="#file_a8019c6d22ca3004461370617a00a4644">&#9670;&nbsp;</a></span>DistanceSquared3D()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float sc2::DistanceSquared3D </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structsc2_1_1_point3_d.html">Point3D</a> &amp;&#160;</td>
          <td class="paramname"><em>a</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structsc2_1_1_point3_d.html">Point3D</a> &amp;&#160;</td>
          <td class="paramname"><em>b</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>The distance squared between two 3D points, faster than Distance3D. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">a</td><td>First point. </td></tr>
    <tr><td class="paramname">b</td><td>Second point. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Distance^2. </dd></dl>

</div>
</div>
<a id="file_a5fc6c7967b887f2f9e1338db01a9d079"></a>
<h2 class="memtitle"><span class="permalink"><a href="#file_a5fc6c7967b887f2f9e1338db01a9d079">&#9670;&nbsp;</a></span>Dot2D()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float sc2::Dot2D </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structsc2_1_1_point2_d.html">Point2D</a> &amp;&#160;</td>
          <td class="paramname"><em>a</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structsc2_1_1_point2_d.html">Point2D</a> &amp;&#160;</td>
          <td class="paramname"><em>b</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>The dot product of two 2D vectors. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">a</td><td>First vector. </td></tr>
    <tr><td class="paramname">b</td><td>Second vector. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Dot product. </dd></dl>

</div>
</div>
<a id="file_a9c24088000a232e811c93759fc08bad9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#file_a9c24088000a232e811c93759fc08bad9">&#9670;&nbsp;</a></span>Dot3D()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float sc2::Dot3D </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structsc2_1_1_point3_d.html">Point3D</a> &amp;&#160;</td>
          <td class="paramname"><em>a</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structsc2_1_1_point3_d.html">Point3D</a> &amp;&#160;</td>
          <td class="paramname"><em>b</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>The dot product of two 3D vectors. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">a</td><td>First vector. </td></tr>
    <tr><td class="paramname">b</td><td>Second vector. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Dot product. </dd></dl>

</div>
</div>
<a id="file_abc67208faaf8b25c157b46bb6f96e5a5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#file_abc67208faaf8b25c157b46bb6f96e5a5">&#9670;&nbsp;</a></span>GetRandomEntry()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename Container &gt; </div>
      <table class="memname">
        <tr>
          <td class="memname">Container::value_type&amp; sc2::GetRandomEntry </td>
          <td>(</td>
          <td class="paramtype">Container &amp;&#160;</td>
          <td class="paramname"><em>container</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Gets a random entry from the container. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">container</td><td>Array, list or whatever container. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A random entry. </dd></dl>

</div>
</div>
<a id="file_a0de5bf2e0593ea26ef8dd93ee5456744"></a>
<h2 class="memtitle"><span class="permalink"><a href="#file_a0de5bf2e0593ea26ef8dd93ee5456744">&#9670;&nbsp;</a></span>GetRandomFraction()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float sc2::GetRandomFraction </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Gets a random floating-point number between 0.0 and 1.0. </p><dl class="section return"><dt>Returns</dt><dd>Random floating-point number between 0.0 and 1.0. </dd></dl>

</div>
</div>
<a id="file_aa35b0863b3931b50ce517abab8d06018"></a>
<h2 class="memtitle"><span class="permalink"><a href="#file_aa35b0863b3931b50ce517abab8d06018">&#9670;&nbsp;</a></span>GetRandomInteger()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int sc2::GetRandomInteger </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>min</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>max</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Gets a random integer between min and max inclusive. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">min</td><td>Smallest value a random number could be. </td></tr>
    <tr><td class="paramname">max</td><td>Largest value a random number could be. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Random integer between min and max. </dd></dl>

</div>
</div>
<a id="file_a846ab3c3ff7c33caf7da2dff90a4a171"></a>
<h2 class="memtitle"><span class="permalink"><a href="#file_a846ab3c3ff7c33caf7da2dff90a4a171">&#9670;&nbsp;</a></span>GetRandomScalar()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">float sc2::GetRandomScalar </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Gets a random floating-point number between -1.0 and 1.0. </p><dl class="section return"><dt>Returns</dt><dd>Random floating-point number between -1.0 and 1.0. </dd></dl>

</div>
</div>
<a id="file_a32b33904e90d1de59f334c664971c70a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#file_a32b33904e90d1de59f334c664971c70a">&#9670;&nbsp;</a></span>Normalize2D()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void sc2::Normalize2D </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structsc2_1_1_point2_d.html">Point2D</a> &amp;&#160;</td>
          <td class="paramname"><em>a</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Normalize a 2D point. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">a</td><td>Point. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="file_ab4edfeead03941be04ed2fca1ed4e551"></a>
<h2 class="memtitle"><span class="permalink"><a href="#file_ab4edfeead03941be04ed2fca1ed4e551">&#9670;&nbsp;</a></span>Normalize3D()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void sc2::Normalize3D </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structsc2_1_1_point3_d.html">Point3D</a> &amp;&#160;</td>
          <td class="paramname"><em>a</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Normalize a 3D point. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">a</td><td>Point. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>
